;=============================================================================== ; Sample Lookup File ;=============================================================================== ; ; Lookup files are very similar to CSV (Comma Separated Value) files, but ; there are some special rules: ; ; - Null lines (or lines containing only spaces and tabs) are ignored ; - Lines starting with a semi-colon (like this one) are ignored ; - Untypeable characters can be represented with #decimal or $hex symbols ; - You can use spaces to spread out fields (making the file easier to read) ; ; -------------------------------------------------------------------------- ; Different Methods of Representing the Fields ; -------------------------------------------------------------------------- ; ; -------- ------------------- ------------------------------------------- ; Method Example Comments ; -------- ------------------- ------------------------------------------- ; Simple Text No commas or spaces in the fields ; Quoted "Some text" The surrounded quotes are removed ; Quoted "A ""text"" string" Doubled-up quotes are taken as one quote ; Decimal #13#10 This would mean "Carriage Return/Linefeed" ; Hex $0D$0A This would mean "Carriage Return/Linefeed" ; Mixed "CR is: "#10 Quoted & decimal (no spaces outside quotes) ; Mixed "LF is: "$0A Quoted & hex ; -------- ------------------- ------------------------------------------- ; ; You cannot mix Simple with Decimal or Hex (John$0A would not work) ; If a field contains a comma, it MUST be placed in "quotes" ; ;=============================================================================== ; Some sample lookup data, using (almost) standard CSV format ; (In standard CSV format, you would not put spaces between fields) ;------------------------------------------------------------------------------- ; Field 1 (by default, the LookupFile command uses this as the key field) ; | Field 2 (by default, LookupFile considers this the data field) ; | | Field 3 (LookupFile CAN be told to use this field) ; | | | "CAR" , "Vehicle" , "Automobile" "CAT" , "Kitty" , "Feline" "HOME" , "Abode" , "Domicile" "WORK" , "Toil" , "Business" "LEISURE" , "Fun" , "Diversion" ;=============================================================================== ; Examples of various methods of representing the fields ;=============================================================================== ; ; Three examples of simple fields ; ThisIsField1,ThisIsField2,ThisIsField3 AA,xAAx,zAAz BB,[BB],(BB) ; ; Two examples of quoted fields ; Note the use of spaces outside of the quoted fields to line them up nicely ; "CC" , " CC, Field 2 " , " CC, Field 3 " "DD" , "[ DD ]" , "( DD )" ; ; Example of using simple, hex and quoted on the same line ; Note that spaces are ignored ; The example is equivalent to: 666,555,444 ; 666, $35$35$35, "444" ; ; Example of using quoted, hex and decimal on the same line ; The example is equivalent to: 999,888,777 ; "999", #8$38$38, #55#55#55 ; ; Example of using mixed representation, with liberal use of spaces ; The example is equivalent to 333,222,111 ; "3"$33#51 , "22"$32 , # 49 $ 31 "1" ;=============================================================================== ; Character Remapping with MassChange ;=============================================================================== ; ; When a Lookup file is used with single characters, you can use the ; MassChange command to remap character sets. In the following brief and ; incomplete example of this technique, field one is a lowercase ASCII ; character, while field two is the character in uppercase. Since this ; particular Lookup file has three fields, we could make the third field ; the EBCDIC or Unicode equivalent. However, in this case we'll set the ; third field to the way the letter sounds. ; ; Normally, of course, you would not put a remapping table in with other ; Lookup information: the table would be by itself in the file and would ; typically have only two fields. So here are 'a', 'b' and 'c' ... ; $61 , $41 , "Ay" $62 , $42 , "Bee" $63 , $43 , "See"